<?php

namespace App\Transformers;

use Illuminate\Database\Eloquent\Model;
use League\Fractal\TransformerAbstract;

class NoticeTransformer extends TransformerAbstract
{
    public function transform(Model $tx)
    {
        return [
            'id'=>$tx->id,
            'title'=>$tx->title,
            'content'=>$tx->content,
            'is_popup_true'=>$tx->is_popup_true,
            "created_at" => $tx->created_at->timestamp,
            "updated_at" => $tx->updated_at->timestamp,
        ];
    }
}
